body {
  perspective: 500px;
  -webkit-perspective: 300px;
}

$transition-time: 0.5s;

#wc-canvas-container {
  position: fixed;
  top: 0; left: 0;
  height: 100%; width: 100%;
  overflow: hidden;

  perspective: 500px;
  -webkit-perspective: 300px;
}

#wc-canvas {
  position: absolute;
  top: 50%; left: 50%;
}

#wc-canvas-hover {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 4px 0 #008;
  padding: 2px;
  margin: -4px 0 0 -4px;
  pointer-events: none;
}

#wc-canvas-hover-label {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: rgba(#fff, 0.8);
  color: #333;
  margin-top: 6px;
  padding: 0 0.5em;
  border-radius: 0.5em;
  white-space: nowrap;
}

#wc-loading {
  transition:
    visibility $transition-time ease,
    opacity $transition-time ease;
  -webkit-transition:
    visibility $transition-time ease,
    opacity $transition-time ease;
  &[hidden] {
    display: inherit;
    visibility: hidden;
    opacity: 0;
  }
}

#wc-browser-support {
  position: absolute;
  top: 70%; left: 0;
  width: 100%; height: 30%;
  z-index: 3050;
}

:lang(zh-TW) .only-en-US,
:lang(en-US) .only-zh-TW {
  display: none;
}

#wc-source-dialog,
#wc-dashboard {
  // XXX: Apply visibility transition to visible element
  // will stop element within from getting |focus()| programmatically.
  // Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=869512
  // WebKit and Chromium bug not filed yet.
  transition:
    opacity $transition-time ease,
    transform $transition-time ease;
  -webkit-transition:
    opacity $transition-time ease,
    -webkit-transform $transition-time ease;
  transform-origin: center 80%;
  -webkit-transform-origin: center 80%;
  &[hidden] {
    transition:
      visibility $transition-time ease,
      opacity $transition-time ease,
      transform $transition-time ease;
    -webkit-transition:
      visibility $transition-time ease,
      opacity $transition-time ease,
      -webkit-transform $transition-time ease;
    display: inherit;
    transform: rotateX(-20deg);
    -webkit-transform: rotateX(-20deg);
    visibility: hidden;
    opacity: 0;
  }
}

#wc-source-selection {
  display: none;
}

#wc-source-selection {
  display: none;
}

#wc-source-menu {
  margin-top: -10px;
  padding: 10px 0;
  width: 124px;
  & li{
    position: relative;
    &.active {
      &:before, &:after {
        width: 10px;
        height: 10px;
        content: ' ';
        position: absolute;
        right:-1px;
        border-right: 1px solid #DDD;
        box-shadow: 4px 0 0 white;
      }
      &:before {
        top: -10px;
        border-bottom: 1px solid #DDD;
        border-radius: 0 0 5px 0;
      }
      &:after {
        bottom: -10px;
        border-top: 1px solid #DDD;
        border-radius: 0 5px 0 0;
      }
    }
  }
}
@media (max-width: 767px) {
  #wc-source-dialog .tabs-left {
    display: none;
  }
  #wc-source-selection {
    display: inline;
  }
}

.modal-footer .input-prepend,
.modal-header select {
  margin: 0;
}

.modal {
  position: absolute;
}

.btn[hidden] {
  display: none;
}

#wc-dashboard {
  z-index: 15;
  .btn-group {
    margin-bottom: 5px;
  }
}

#wc-about-dialog iframe {
  display: none;
}

#wc-list-dialog, #wc-sharer-dialog, #wc-about-dialog {
  // XXX: Apply visibility transition to visible element
  // will stop element within from getting |focus()| programmatically.
  // Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=869512
  // WebKit and Chromium bug not filed yet.
  transition:
    opacity $transition-time ease,
    transform $transition-time ease;
  -webkit-transition:
    opacity $transition-time ease,
    -webkit-transform $transition-time ease;
  &[hidden] {
    transition:
      visibility $transition-time ease,
      opacity $transition-time ease,
      transform $transition-time ease;
    -webkit-transition:
      visibility $transition-time ease,
      opacity $transition-time ease,
      -webkit-transform $transition-time ease;
    display: inherit;
    transform: translateY(-200%);
    -webkit-transform: translateY(-200%);
    visibility: hidden;
    opacity: 0;
  }
}

#wc-sharer-img-link {
  &[hidden] {
    display: none;
  }
  margin-bottom: 20px;
}

#wc-about-icon {
  position: relative;
  height: 120px;
}

#wc-about-content {
  h1 {
    font-size: 31.5px;
  }
  h2 {
    font-size: 24.5px;
  }
  h3 {
    font-size: 17.5px;
    line-height: 20px;
  }
}

$icon-width: 100px;
$icon-height: $icon-width * .3333;
$hoz-shift: $icon-width * 0.13;
$shadow-length: $icon-width * 0.05;
.wc-icon-cloud {
  .error & {
    background-color: shade(#fff, 15%);
    box-shadow:
      inset 0 (- $shadow-length / 2) rgba(shade(#fff, 15%), 0.6),
      0 $shadow-length $shadow-length rgba(0, 0, 0, 0.1),
      inset 0 (- $shadow-length) $shadow-length rgba(shade(rgb(0, 100, 160), 15%), 0.1);
  }

  &:before, &:after {
    .error & {
      background-color: shade(#fff, 15%);
    }
  }
}

#wc-loading-label {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;

  margin-top: ($icon-width / 2);
  text-align: center;
}

#wc-source-dialog > .modal-body {
  min-height: 200px;
}

#wc-source-panels .btn {
  margin-right: 10px;
  margin-bottom: 10px;
}

.file-wrapper {
  position: relative;
  overflow: hidden;
  > input {
    position: absolute;
    opacity: 0;
    top: 0;
    right: 0;
  }
}

#wc-psm > iframe {
  display: block;
  margin: 1em 0;
  width: 250px;
  height: 250px;
}

#wc-dashboard {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  > .container {
    margin-top: 10px;
  }

  .hide-label > span {
    display: none;
  }
  @media (min-width: 1200px) {
    .hide-label > span {
      display: inherit;
    }
  }
  @media (max-width: 979px) {
    button > span, a > span {
      display: none;
    }
  }

  .btn > span {
    padding-left: 5px;
  }
}

.wc-sharer-service-title {
  > [class^="favicons-"], [class*=" favicons-"] {
    vertical-align: middle;
    margin-right: 4px;
  }

  font-weight: bold;
  &::after {
    content: ': ';
    font-weight: normal;
  }
}
.wc-sharer-service {
  > a.disabled {
    color: #333;
    cursor: text;
    &:hover {
      text-decoration: none;
    }
  }
}

#wc-sns-push {
  position: absolute;
  top: 10%;
  right: 0;
  z-index: 1060;

  @media (max-width: 767px) {
    top: 600px;
    right: 17px;
  }

  @media (max-width: 480px) {
    top: 600px;
    right: 7px;
  }

  > .button {
    background-color: #fff;
    border: 1px solid #aaa;
    border-bottom: 1px solid #eee;
    height: 65px;
    width: 50px;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    margin: 3px;
    right: 0;
    opacity: 1;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 3px 7px 0px;

    > iframe {
      border: none;
      overflow: hidden;
      width: 50px;
      height: 65px;
    }
  }
}

@import "favicons/*.png";
@include all-favicons-sprites;

[class^="favicons-"], [class*=" favicons-"] {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 14px;
  vertical-align: text-top;
}

.smaller-icon {
  transform: scale(0.8);
  -o-transform: scale(0.8);
  -ms-transform: scale(0.8);
  -webkit-transform: scale(0.8);
}
